(function() {
	var cfg = {
		paths : {
			'csp' : '.',
			'root' : '..',
			'app' : 'js/app',
			'jquery' : 'jquery/jquery',
			'angular' : 'angular/angular',
			'angularMaterial' : 'angular/angular-material',
			'angularAMD' : 'angular/angularAMD.min',
			'ngload' : 'angular/ngload.min',
			'bootstrap' : 'bootstrap/js/bootstrap.min',
			'angular-route' : 'angular/angular-ui-router',
			'angular-animate' : 'angular/angular-animate',
			'angular-aria' : 'angular/angular-aria',
			'angular-messages' : 'angular/angular-messages',
			'angular-sanitize' : 'angular/angular-sanitize.min',
			'angular-toaster' : 'angular/toaster.min',
			'angular-chosen' : 'angular/angular-chosen.min',
			'ui-select' : 'angular/select.min',
			'jquery-goup' : 'jquery/jquery.goup.min',
			'jquery-smartfloat' : 'jquery/jquery-smartfloat',
			'jquery-sticky-kit' : 'jquery/sticky-kit.min',
			'jquery-sidebar' : 'jquery/jquery.sidebar.min',
			'jquery-remodal' : 'jquery/remodal.min',
			'jquery-validate' : 'jquery/jquery.validate.min',
			'jquery-datepicker' : 'jquery/datepicker',
			'jquery-datepicker-locale' : 'jquery/datepicker-locale-zhCN',
			'jquery-validate-locale' : 'jquery/localization/messages_zh.min',
			'jquery-ztree' : 'jquery/ztree/jquery.ztree.all-3.5.min',
			'jquery-chosen' : 'jquery/chosen.jquery.min',
			'jquery-form' : 'jquery/jquery.form.min',
			'bootstrap-switch' : 'bootstrap/js/bootstrap-switch.min',
			'chart' : 'chart/Chart.min',
			'angular-toggle-switch' : 'angular/angular-toggle-switch.min',
			'ueditor-config' : 'ueditor/ueditor.config',
			'ueditor' : 'ueditor/ueditor.all.min',
			'zeroClipboard' : 'ueditor/third-party/zeroclipboard/ZeroClipboard.min',
			'sc-router' : 'js/sc-router',
			'sc-base' : 'js/sc-base',
			'ctrl-admin' : 'js/ctrl-admin',
			'ylc-common' : 'js/ylc-common',
			'wangEditor' : 'js/wangEditor-1.1.0',
			'ctrl-student' : 'js/ctrl-student',
			'SparkMD5' : 'upload/spark-md5.min',
			'Stream' : 'upload/stream-v1.min',
			'moment' : 'moment/moment-with-locales.min',
			'bootstrap-datetimepicker' : 'bootstrap/datetimepicker/js/bootstrap-datetimepicker.min'
		},
		shim : {
			'chart' : {
				exports : 'Chart'
			},
			'bootstrap' : {
				deps : [ 'jquery', 'css!root/asset/css/ui.css' ]
			},
			'bootstrap-switch' : {
				deps : [ 'bootstrap', 'css!./csp/bootstrap/css/bootstrap-switch.min.css' ]
			},
			'jquery-remodal' : {
				deps : [ 'jquery', 'css!./csp/jquery/remodal.css', 'css!./csp/jquery/remodal-default-theme.css' ]
			},
			'jquery-ztree' : {
				deps : [ 'jquery', 'css!./csp/jquery/ztree/zTreeStyle/zTreeStyle.css' ]
			},
			'jquery-validate' : {
				deps : [ 'jquery' ]
			},
			'jquery-smartfloat' : {
				deps : [ 'jquery' ]
			},
			'jquery-sticky-kit' : {
				deps : [ 'jquery' ]
			},
			'jquery-validate-locale' : {
				deps : [ 'jquery', 'jquery-validate' ]
			},
			'jquery-datepicker' : {
				deps : [ 'jquery' ]
			},
			'jquery-datepicker-locale' : {
				deps : [ 'jquery', 'jquery-datepicker' ]
			},
			'jquery-sidebar' : {
				deps : [ 'jquery' ]
			},
			'jquery-chosen' : {
				deps : [ 'jquery' ]
			},
			angular : {
				deps : [ 'jquery' ],
				exports : 'angular'
			},
			'angular-route' : {
				deps : [ 'angular' ]
			},
			'angular-animate' : {
				deps : [ 'angular' ]
			},
			'angular-sanitize' : {
				deps : [ 'angular' ]
			},
            'angular-aria' : {
                deps : ['angular']
            },
			'angular-messages' : {
				deps : ['angular']
			},
			'angularMaterial' : {
				deps : ['angular','angular-aria','angular-animate','angular-messages','css!./csp/angular/angular-material.css']
			},
			'angular-toaster' : {
				deps : [ 'angular', 'angular-animate', 'css!./csp/angular/toaster.min.css' ]
			},
			'angular-toggle-switch' : {
				deps : [ 'angular', 'bootstrap-switch' ]
			},
			'angular-chosen' : {
				deps : [ 'angular', 'jquery-chosen', 'css!./csp/bootstrap/chosen/bootstrap-chosen.css' ]
			},
			'ui-select' : {
				deps : [ 'angular', 'css!./csp/angular/select.min.css' ]
			},
			'jquery-goup' : {
				deps : [ 'jquery' ]
			},
			ueditor : {
				exports : 'UE',
				deps : [ 'zeroClipboard', 'ueditor-config', 'css!./csp/ueditor/themes/default/css/ueditor.min.css' ]
			},
			'SparkMD5' : {},
			'Stream' : {
				deps : [ 'SparkMD5' ],
				exports : 'Stream'
			}
		},
		waitSeconds : 0
	}
	require.config(cfg);
	require([ 'app' ], function(angularApp) {
		setTimeout(function() {
			require([ 'jquery', 'jquery-goup' ], function($) {
				$.goup({
					containerColor : '#FFF',
					arrowColor : '#3071a9'
				});
			})
		})
	})
})()
